package com.ossjk.qlh.system.service;

import com.ossjk.qlh.system.entity.Department;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 部门表 服务类
 * </p>
 *
 * @author chair
 * @since 2020-02-06
 */
public interface IDepartmentService extends IService<Department> {

	/**
	 * 根据id删除子节点
	 * 
	 * @param id
	 * @return
	 */
	boolean removeChildrenById(Serializable id);

	/**
	 * 根据用户id获取部门id
	 * 
	 * @param uid
	 * @return
	 */
	List<String> listUserDidByUid(String uid);

	/**
	 * 查找所有子节点（不包含自身）
	 * 
	 * @param pid
	 * @param parent
	 * @return
	 */
	List<Department> queryChildrenByPid(Serializable pid, List<Department> parent);

}
